home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 418_02 / rasmol2 / graphics.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-03-02  |  2.4 KB  |  141 lines

  1. /* graphics.h
  2.  * RasMol2 Molecular Graphics
  3.  * Roger Sayle, February 1994
  4.  * Version 2.3
  5.  */
  6.  
  7. #ifdef IBMPC
  8. #define CanvWidth  480
  9. #define CanvHeight 480
  10. #else
  11. #define CanvWidth  576
  12. #define CanvHeight 576
  13. #endif
  14.  
  15. #ifdef EIGHTBIT
  16. #define LutSize  256
  17. #else
  18. #define LutSize  1024
  19. #endif
  20.  
  21.  
  22. #define RFRotateX  0x0001
  23. #define RFRotateY  0x0002
  24. #define RFRotateZ  0x0004
  25. #define RFZoom     0x0008
  26. #define RFTransX   0x0010
  27. #define RFTransY   0x0020
  28. #define RFTransZ   0x0040
  29. #define RFSlab     0x0080
  30. #define RFReSize   0x0100
  31. #define RFPoint    0x0200
  32. #define RFColour   0x0400
  33. #define RFRefresh  0x0800
  34.  
  35. #define RFTrans    0x0070
  36. #define RFRotate   0x0007
  37. #define RFApply    0x017F
  38. #define RFDials    0x00FF
  39. #define RFMagnify  0x0108
  40. #define RFInitial  0x01FF
  41.  
  42.  
  43. #define MMRasMol   0x00
  44. #define MMInsight  0x01
  45. #define MMQuanta   0x02
  46.  
  47.  
  48. #define ButMax   8
  49.  
  50.  
  51. #ifdef GRAPHICS
  52. double DialValue[8];
  53. Pixel Lut[LutSize];
  54. int PointX, PointY;
  55. int XRange, WRange;
  56. int YRange, HRange;
  57. int UseHourGlass;
  58. int MenuDisable;
  59. int ReDrawFlag;
  60. int Range;
  61.  
  62. #ifdef IBMPC
  63. HWND CanvWin;
  64. HBITMAP PixMap;
  65. HPALETTE ColourMap;
  66. LOGPALETTE __far *Palette;
  67. #endif /* IBMPC */
  68.  
  69. Byte RLut[256];
  70. Byte GLut[256];
  71. Byte BLut[256];
  72. Byte ULut[256];
  73.  
  74. #else /* GRAPHICS */
  75. extern double DialValue[8];
  76. extern Pixel Lut[LutSize];
  77. extern int PointX, PointY;
  78. extern int XRange, WRange;
  79. extern int YRange, HRange;
  80. extern int UseHourGlass;
  81. extern int MenuDisable;
  82. extern int ReDrawFlag;
  83. extern int Range;
  84.  
  85. #ifdef IBMPC
  86. extern HWND CanvWin;
  87. extern HBITMAP PixMap;
  88. extern HPALETTE ColourMap;
  89. extern LOGPALETTE __far *Palette;
  90. #endif /* IBMPC */
  91.  
  92. extern Byte RLut[256];
  93. extern Byte GLut[256];
  94. extern Byte BLut[256];
  95. extern Byte ULut[256];
  96.  
  97. #ifdef __STDC__
  98. void AllocateColourMap();
  99. void ClearImage();
  100. void TransferImage();
  101. void UpdateScrollBars();
  102. void SetMouseMode( int );
  103. int LookUpColour( char*, int*, int*, int* );
  104. void CloseDisplay();
  105. void BeginWait();
  106. void EndWait();
  107.  
  108. #ifdef IBMPC
  109. int OpenDisplay( HANDLE, int );
  110. int PrintImage();
  111. #else
  112. int OpenDisplay( int, int );
  113. void NewMenu( int, char** );
  114. int FetchEvent( int );
  115. Pixel *CreateImage();
  116. #endif /* IBMPC */
  117.  
  118. #else /* non-ANSI C compiler */
  119. int OpenDisplay();
  120. void AllocateColourMap();
  121. void ClearImage();
  122. void TransferImage();
  123. void UpdateScrollBars();
  124. void SetMouseMode();
  125. int LookUpColour();
  126. void CloseDisplay();
  127. void BeginWait();
  128. void EndWait();
  129.  
  130. #ifdef IBMPC
  131. int PrintImage();
  132. #else
  133. void NewMenu();
  134. int FetchEvent();
  135. Pixel *CreateImage();
  136. #endif /* IBMPC */
  137.  
  138. #endif
  139. #endif /* GRAPHICS */
  140.  
  141.